package cc.comac.mom.controller.user;

import cc.comac.mom.api.QualityAsrCheckFormService;
import cc.comac.mom.api.UsersSelCmd;
import cc.comac.mom.bean.QualityAsrCheckForm;
import cc.comac.mom.bean.QualityReject;
import cc.comac.mom.bean.user.UserCenterBean;
import cc.comac.mom.entity.AsrCheckFormPrint;
import cc.comac.mom.util.BaseConnectionData;
import cc.comac.mom.util.BeanManager;
import cc.comac.mom.util.JasperHelper;
import cc.comac.mom.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.sql.Connection;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/User")
public class UserController {

	@Autowired
	private UsersSelCmd usersSelCmd;
	

	@ApiOperation("查询检验表单及检验表单详情信息")
	@RequestMapping(value = "/selectByCode", method = RequestMethod.POST)
	public ResultBean selectBySomefields(@RequestBody UserCenterBean user) {
		ResultBean resultBean=new ResultBean();
		try {
			resultBean.setObject(usersSelCmd.selectUserByEcode(user.getCode()));
		}catch (Exception e){
			user.setTRUENAME("本地");
			resultBean.setObject(user);
		}
		return resultBean;
	}

}
